<?php if (!defined('BASEPATH')) exit('No direct script access allowed.');

class MY_Form_validation extends CI_Form_validation {

    function __construct()
    {
        parent::__construct(); 
        
        /*   Config FirePHP::   */
        $CI =& get_instance();
        $CI->load->config('fireignition');         

        if ($CI->config->item('fireignition_enabled'))
        {
            if (floor(phpversion()) < 5)
            {
                log_message('error', 'PHP 5 is required to run fireignition');
            } else {
                $CI->load->library('firephp');
            }
        }
        else 
        {
            $CI->load->library('firephp_fake');
            $CI->firephp =& $CI->firephp_fake;
        }

    }    


    function provjeri_dropdown($string_var) {    

        /*$CI =& get_instance(); 
        
        $CI->firephp->info('str:'.$string_var);
        $CI->firephp->info('POST["typeofuser"] : gettype('.gettype ($_POST['typeofuser']).')');
        $CI->firephp->info('POST["typeofuser"] : getvalue('.$_POST['typeofuser'].')');*/
        
        $contition_strict = '0';
        
        /*$CI->firephp->info('POST["typeofuser"] : gettype('.gettype ($contition_strict).')');
        $CI->firephp->info('POST["typeofuser"] : getvalue('.$contition_strict.')');*/
        
        
        if($string_var==$contition_strict){

            /*$CI->firephp->error("Condition can not be false!");*/
            
            return FALSE;

        }

        return TRUE;

    }

}

